第 9步: play_game()将在屏幕上创建随机精灵。让我们从列表中选择它们!

my_dictionary .keys()返回字典中每个键的列表[ ]

  • 在 LOGIC 中,转到并将Get Keys缩进并play_game()
  • 将变量keys两个(有两个!)实例更改为image_list
  • 点击运行并按下控制台。你看到控制台打印了什么?

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)